package routers

import (
	"gvb_server/api"
	"gvb_server/middleware"
)

func (router RouterGroup) MessageRouter() {
	app := api.ApiGroupApp.MessageApi
	router.POST("messages", middleware.JwtAuth(), app.MessageCreateView)
	router.GET("messages_all", app.MessageListAllView)
	router.GET("messages", middleware.JwtAuth(), app.MessageListView)
	router.GET("messages_record", middleware.JwtAuth(), app.MessageRecordView)
	router.DELETE("messages_record", middleware.JwtAuth(), app.MessageRecordRemoveView)
	router.GET("messages_user_list", app.MessageUserListView)
	router.GET("messages_user_list_by_me", middleware.JwtAuth(), app.MessageUserListByMeView)
	router.GET("messages_user_list_by_user", app.MessageUserListByUserView)
	router.GET("messages_user_record_by_me", middleware.JwtAuth(), app.MessageUserRecordByMeView)
	router.GET("messages_user_record_by_user", app.MessageUserRecordView)
}
